home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmigaPlus / Begleitmaterial / 50Tools / Grafik / PerfectPaint / rexx / Anim / Dissolve / Current_Mask < prev    next >
Text File  |  2001-10-01  |  833b  |  67 lines

  1. /* Dissolve
  2. 100
  3. */
  4.  
  5.     call addlib("rexxmathlib.library", 5, -30, 0)
  6.  
  7.     options results
  8.  
  9.     parse ARG Port Opt1 Opt2 Opt3 s0 t0 s1 t1 b
  10.     
  11.     ADDRESS value Port
  12.  
  13.     pp_GetWidth
  14.     w=result
  15.     pp_GetHeight
  16.     h=result
  17.     pp_GetDepth
  18.     D=result
  19.  
  20.     pp_GetCurrentBrush
  21.     CB=result
  22.  
  23.     pp_FindEmptyBrush
  24.     Brush=result
  25.     if Brush=-1 then DO
  26.         pp_Warn "can't*find*empty|Brush."
  27.         EXIT        
  28.     END
  29.  
  30.     pp_EffectOff
  31.     pp_SetBrush Brush        
  32.     pp_GotoFrame s1
  33.     pp_PicttoSpare
  34.     pp_GotoFrame s0            
  35.     pp_Pickbrush 0 0 W H 1
  36.     
  37.     step=(s1-s0)
  38.     Step_f=255/Step
  39.  
  40.     DO i=s0 to s1
  41.         IF t1=1 then DO
  42.             pp_GotoFrame (s1+i-s0)
  43.             pp_PicttoSpare
  44.         END
  45.  
  46.         pp_GotoFrame i
  47.  
  48.         IF t0=0 then DO
  49.             pp_plot W/2 H/2
  50.         END
  51.  
  52.         f=Step_f*(i-s0)
  53.         IF Opt1=0 then DO
  54.             pp_Dissolve f 255            
  55.         END
  56.         ELSE DO
  57.             pp_Dissolve f f
  58.         END
  59.         pp_Refresh
  60.     END
  61.  
  62.         pp_Gotoframe s0
  63.         pp_FreeBrush
  64.         pp_SetBrush CB
  65.  
  66.     EXIT
  67.